home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Games 1996 July
/
Amiga Games 1996 #7.iso
/
rexx
/
dlg
/
xtrudercheck.rexx
Wrap
OS/2 REXX Batch file
|
1995-10-19
|
2KB
|
98 lines
/*
* $VER:XtruderCheck.rexx 1.0 (19.10.95)
*/
/*
* Bugs ... none known
*
* If you happen to find one anyway, then please notify me:
*
* Anders Wegge Jakobsen
* 2:238/28@fidonet
* 39:140/109@amiganet
* wegge@daimi.aau.dk
*
* The same goes for ideas, feature requests etc...
*/
/*
* Installation:
*
* Really simple, just modify DLGConfig:Batch/Upload2.batch to call
* this script:
*
* --Upload2.batch--
* .key UserName/a,PathFileName/a
* .bra "["
* .ket "]"
*
* Rx Dska:TelePro/OtherRexx/XtruderCheck.rexx [UserName],[PathFileName]
* -Cut end--
*/
/*
* Configuration:
*
* Modify the following two constants to the values fitting your system.
*/
SysOpName = 'Anders_Wegge_Jakobsen'
XtruderPath = 'Work:Diverse/Xtruder/Xtruder'
/*
* No user-serviceable part beyond this point.
*/
PARSE ARG Uploader ',' FileName .
OPTIONS RESULTS
Tries = 0
IF( ~SHOW( 'l', "rexxsupport.library" ) ) THEN
IF( ~ADDLIB( "rexxsupport.library", 0, -30, 0 ) )THEN
EXIT 10
DO WHILE ((Tries < 10 ) & ( ~SHOW('P','XTRUDER')))
ADDRESS COMMAND 'Run >NIL: <NIL: ' || XtruderPath
CALL DELAY(50)
Tries = Tries + 1
END
ADDRESS 'XTRUDER'
ShortFile = RIGHT(FileName,LENGTH(FileName)-LASTPOS('/',FileName))
RealName = STRIP(TRANSLATE(Uploader,' ','_'),'B',' ')
SAY 'Checking ' || ShortFile || ' for viruses...'
IF EXISTS(FileName) THEN DO
CheckFiles FileName
NumVirus = RC
IF NumVirus == 0 THEN SAY '.. checks out OK.'
IF NumVirus ~= 0 THEN DO
SAY '... '||NumVirus||' viruses found, informing sysop.'
MsgName = 'T:XTR_Temp_' || PRAGMA('ID')
CALL OPEN('Msg',MsgName,'WRITE')
CALL WRITELN('Msg','The file ' || ShortFile || ', uploaded by ' || RealName)
CALL WRITELN('Msg','has been checked by Xtruder, which found ')
CALL WRITELN('Msg', NumVirus || ' viruses.')
CALL CLOSE('Msg')
ADDRESS COMMAND 'DLG:SendMsg -f XtruderCheck -s "'|| RealName || '" -b "' || MsgName || '" -n -q -r "' || SysOpName ||'"'
CALL DELETE(MsgName)
END
EXIT